package net.lzzy.practices.entities;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import javax.persistence.*;
import java.util.ArrayList;
import java.util.List;

/**
 * @author admin
 */
@Entity
@Setter
@Getter
@NoArgsConstructor
@Table(name = "options")//防止SQL关键字冲突//

public class Option extends BaseEntity{


    private String content;
    private String label;
    private boolean answer;

    @ManyToOne
    private Question question;

    @ManyToOne
    private Chapter chapter;

    @ManyToMany(mappedBy = "options")
    private List<Result> results = new ArrayList<>();

}
//456